package com.google.appengine.twitter.security;


public class AuthenticationBuilder {

	private String usernameOrEmail;
	private String password;
	private boolean rememberMe;
	private String authenticityToken;

	public static AuthenticationBuilder usernameOrEmail(String usernameOrEmail) {
		AuthenticationBuilder builder = new AuthenticationBuilder();
		builder.usernameOrEmail = usernameOrEmail;
		return builder;
	}

	public AuthenticationBuilder password(String password) {
		this.password = password;
		return this;
	}

	public AuthenticationBuilder rememberMe(boolean rememberMe) {
		this.rememberMe = rememberMe;
		return this;
	}

	public AuthenticationBuilder authenticityToken(String authenticityToken) {
		this.authenticityToken = authenticityToken;
		return this;
	}

	public Authentication build() {
		return new UsernamePaswordToken(usernameOrEmail, password);
	}

}
